Define/Edit Arguments Dialog Box

Description

An argument requests a value to insert into a SQL SELECT statement at run-time. The SQL SELECT statement uses an argument value to complete a filter (WHERE or HAVING) or order (ORDER BY or GROUP BY) expression. The Define/Edits Arguments dialog box creates dialogs that prompt the user for values.

images/SQR_Define_Edit_Arguments.gif

Creating an Argument

A SQL DataSource may contain multiple arguments. To create an argument:

  1. Click Define on the Specify DataSource dialog to display the Define/Edits Arguments dialog box.

  2. Click Add to display the Add Argument dialog box.

  3. Enter a unique argument name and click OK.

  4. Optionally, modify the argument name in the Name control.

  5. In the Prompt control enter a label that defines the value you will have the user input.

  6. Select the data type of the argument from the Type list. The options are:

    • "Character"

    • "Numeric"

    • "Logical"

    • "Date"

    • "Time"

    • "Short Time"

  7. Select the type of control that you want to use from the Style list. The options are:

    • "Textbox"

    • "Listbox"

    • "ComboBox"

    • "EditComboBox"

    • "Radio Buttons"

    • "Password"

    • "Calculator"

    • "Calendar"

  8. Optionally, enter an initial value into the Default Value control. This value can be a constant or defined by an expression.

    images/SQR_Argument_Default_Value.gif
  9. Optionally, define minimum and maximum acceptable values in the Range Checking controls.

  10. If selected the control type is "Listbox", "ComboBox", "EditComboBox", or "Radio Buttons", click Define Choices to display the Define Choices dialog.

    • Enter one choice per line.

    • If you want to display one value, but return another value, enter the choices in the format: Display_Value | Return_Value.

    • Optionally, click Sort to sort them in ascending order.

    • Click OK to save your inputs.

      images/SQR_Define_Listbox_Choices.gif
  11. Optionally, enter more descriptive text for the selected argument into the Help Text control.

  12. Optionally, click Edit as HTML to format the help text as HTML text in the HTML Editor.

    images/SQR_Arguments_help_as_HTML.gif
  13. Optionally, click Customize to modify the appearance of the finished dialog that you will display to a user.

    • You may modify the dialog box title, the OK button label and accelerator key, and the Cancel button label and accelerator key.

    • Click OK to save your inputs.

  14. Optionally, click Preview Dialog to see how the dialog will appear and behave.

    images/SQR_Preview_Argument_dialog.gif
  15. Click OK to save your inputs.

See Also